-
Notifications
You must be signed in to change notification settings - Fork 46
Ait 129 ait docs release branch #3040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
src/pages/docs/ai-transport/features/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
| ``` | ||
| </Code> | ||
|
|
||
| When publishing tokens, don't await the `channel.appendMessage()` call. Ably rolls up acknowledgments and debounces them for efficiency, which means awaiting each append would unnecessarily slow down your token stream. Messages are still published in the order that `appendMessage()` is called, so delivery order is not affected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we suggest that clients check for the success or failure of the publish?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a separate ticket to address this: https://ably.atlassian.net/browse/AIT-238
src/pages/docs/ai-transport/features/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-token.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-token.mdx
Outdated
Show resolved
Hide resolved
src/pages/docs/ai-transport/features/token-streaming/message-per-token.mdx
Outdated
Show resolved
Hide resolved
400eb09 to
f8056cb
Compare
|
|
||
| This pattern is useful when clients only care about the most recent part of a response and you are happy to treat the channel history as a short sliding window rather than a full conversation log. For example: | ||
|
|
||
| - **Backend-stored responses**: The backend writes complete responses to a database and clients load those full responses from there, while Ably is used only to deliver live tokens for the current in-progress response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to promote using this pattern with backend-stored responses, because the backend storage solves the efficient hydration problem but does not solve the problem of missing tokens for the current response (assuming the response is not written to the database until it has been completely streamed, which is the pattern most existing customers are using and struggling with). It would be simpler for a customers to load history from their own database and then use message-per-response to catch up with any in-progress response
aebe2c1 to
ea0ac8d
Compare
7821a8f to
426203f
Compare
src/pages/docs/ai-transport/token-streaming/message-per-response.mdx
Outdated
Show resolved
Hide resolved
Details the message-per-response pattern using Ably `appendMessage` for Anthropic SDK.
Adds a page to the Messaging section that describes sending tool calls and results to users over channels. Indicates ability to build generative user interfaces or implement human in the loop workflows.
Remove /features/ path segment from AI Transport documentation URLs: - /ai-transport/features/messaging/* → /ai-transport/messaging/* - /ai-transport/features/token-streaming/* → /ai-transport/token-streaming/* - /ai-transport/features/sessions-identity/* → /ai-transport/sessions-identity/* Update navigation and internal links in guides accordingly.
Adds a token streaming rate limits page which includes description of the new appendRollupWindow transport parameter.
For high volume token streaming uses cases, we generally advise disabling `echoMessages` to avoid incurring additional cost from echoed messages.
Prevent multiple agent(and Realtime) .
20df5cb to
01ab0f8
Compare
Adds additional friendly guidance to the writing style guide to stop LLMs consuming it from falling back onto bad habits.
Add information about pricing to the overview page and include a worked example for illustration
paddybyers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
AIT DOCS INTEGRATION BRANCH
Checklist